package com.frame.domain;

import java.io.Serializable;
import java.util.Date;

import com.mini.core.WeakEntity;
import com.mini.core.annotation.Column;
import com.mini.core.annotation.Entity;
import com.mini.core.utils.EnumClazz.StrategyType;

/**
 * @author sxjun
 * @version 2016-3-11
 */
@Entity(table="HostConfig",id="ID",strategy=StrategyType.UUID)
public class HostConfig extends WeakEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	
	/**
	 * Columns
	 */
	public static final class Columns {
		public static final String id = "ID";
		public static final String name = "NAME";
		public static final String uri = "uri";
		public static final String createtime = "CREATETIME";
	}
	
	/**
	 * Primary key
	 * @return
	 */
	@Column("id")
	public String getId() {
		return super.getStr(Columns.id);
	}
	/**
	 * Primary key
	 * @param id
	 * @return
	 */
	public HostConfig setId(String id) {
		super.set(Columns.id, id);
		return this;
	}
	
	/**
	 * uri addr,eg：http://192.168.202.14:2375
	 * @return
	 */
	@Column("uri")
	public String getUri() {
		return super.getStr(Columns.uri);
	}
	/**
	 * set uri addr,eg：http://192.168.202.14:2375
	 * @param uri
	 * @return
	 */
	public HostConfig setUri(String uri) {
		super.set(Columns.uri, uri);
		return this;
	}
	
	/**
	 * Get the name of docker server
	 * @return
	 */
	@Column("name")
	public String getName() {
		return super.getStr(Columns.name);
	}
	
	/**
	 * Set the name of docker server
	 * @param name
	 * @return
	 */
	public HostConfig setName(String name) {
		super.set(Columns.name, name);
		return this;
	}
	
	/**
	 * Get the createtime
	 * @return
	 */
	@Column("createtime")
	public Date getCreatetime() {
		return super.getDate(Columns.createtime);
	}
	
	/**
	 * set the createtime
	 * @param createtime
	 * @return
	 */
	public HostConfig setCreatetime(String createtime) {
		super.set(Columns.createtime, createtime);
		return this;
	}
}
